from dataclasses import dataclass

from manager import BarManager


@dataclass
class Account:
    volume = 0
    high_price: float = 0.0
    intra_trade_low: float = 0.0
    cancel_price: float = 0.0
    buy_price: float = 0.0

def sysInit(context, symbols: str):
    context.symbol_str = symbols
    context.symbol_list = symbols.split(",")
    context.symbol_num = len(context.symbol_list)

    context.manager_list: list = []
    context.account_list: list = []
    for i in range(context.symbol_num):
        context.manager_list.append(BarManager())
        context.account_list.append(Account())
